package com.xunlai.infra.permission.manager.web.vo.user;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author liang
 * @date 2022/12/2 17:15
 */
@Data
public class CreateUserAccountReqVo implements Serializable {

    @Serial
    private static final long serialVersionUID = -5688516256815927236L;

    @NotEmpty(message = "登录账号不能为空")
    @Length(min = 4, max = 16, message = "账号长度为 4-16 位")
    @Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母")
    private String account;

    @NotEmpty(message = "密码不能为空")
    @Length(min = 4, max = 16, message = "密码长度为 4-16 位")
    private String password;

    /**
     * 手机号
     */
    private String mobileNumber;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 身份证
     */
    private String idCard;
    /**
     * 昵称
     */
    private String nickname;
    /**
     * 头像
     */
    private String portrait;

}
